#include <DBManager.hpp>

DBManager::DBManager() : connection(false)
{

}

DBManager::DBManager(const std::string& d, const std::string& h, 
		     const std::string& u, const std::string& p)
  : connection(false), db(d), host(h), user(u), pass(p)
{

}

/*mysqlpp::Connection* DBManager::new_connection(const std::string& db, 
					       const std::string& host, 
					       const std::string& user, 
					       const std::string& pass)
{
  mysqlpp::Connection* conn = new mysqlpp::Connection;
  if ( conn == 0 ) return 0;

   
  if ( conn->connect(db.c_str(), host.c_str(), user.c_str(), pass.c_str()) &&
       conn->query("USE allen;").execute() && 
       conn->query("SET NAMES utf8;").execute() ) {
  } else {
    std::cerr << conn->error() << std::endl;
    return 0;
  }

  return conn;
}

void DBManager::delete_connection(mysqlpp::Connection** connection)
{
  (*connection)->disconnect();
  delete (*connection);
}
*/
